<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>京东的左侧栏</title>
    <style>
        body{
            background-color: #bfa;
        }
        .left-nav{
            /* 设置宽度 */
            width: 190px;
            /* 设置高度 */
            height: 450px;
            /* 设置padding */
            padding: 10px 0;
            /* 设置背景颜色 */
            background-color: #fff;
            margin: 50px auto;
        }
        /* 设置菜单内部的item */
        .left-nav .item{
            height: 25px;
            /* 要让一个文字在父元素中垂直居中，只需要将父元素的line-height设置为同一个值即可 */
            line-height: 25px;
            /**/
            padding-left: 18px;
            /* font-size: 12px; */
        }

        /* 为item设置鼠标移入的状态 */
        .item:hover{
            background-color: #d9d9d9;
        }

        .item a{
            /* 设置字体大小，默认大小是16px */
            font-size: 14px;
            color: #333;
            /* 去除下划线 */
            text-decoration: none;
        }

        .item a:hover{
            color: red;
        }

        .item span{
            font-size: 12px;
            padding: 0 5px;
        }
    </style>
</head>
<body>
    
    <nav class="left-nav">
        <div class="item">
            <a href="#">家用电器</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
        <div class="item">
            <a href="#">手机</a><span>/</span><a href="#">运营商</a><span>/</span><a href="#">数码</a>
        </div>
    </nav>
</body>
</html>